<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>java</title>
    <link rel="stylesheet" href="/static/css/style.css"/>
</head>
<body>

    <div class="n-support">请使用Chrome、Safari等webkit内核的浏览器！</div><div class="n-head">
        <div class="g-doc f-cb">
            <div class="user">
                卖家你好,seller! <a href="/logout">[退出]</a>
            </div>
            <ul class="nav">
                <li><a href="/api/sellerindex">首页</a></li>
                <li><a href="/api/public">发布</a></li>
            </ul>
        </div>
    </div>

    <div class="g-doc">
        <div class="m-tab m-tab-fw m-tab-simple f-cb">
            <div class="tab">
                <ul>
                    <li class="z-sel" ><a href="/api/sellerindex">所有内容</a></li>
                </ul>
            </div>
        </div>
        <div class="n-plist">
            <ul class="f-cb" id="plist">
                <#list books as book>
                    <li id="p-${book_index+1}">
                        <a href="/api/show?id=${book.id}" class="link">
                            <div class="img"><img src="${book.picture}" alt="${book.title}"></div>
                            <h3>${book.title}</h3>
                            <div class="price"><span class="v-unit">¥</span><span class="v-value">${book.price}</span></div>
                            <#if book.isSell == 1>
                                <span class="had"><b>已售出</b></span>
                            </#if>
                        </a>
                        <#if book.isSell == 0>
                            <form action="/api/delete?id=${book.id}" method="post">
                                <input type="hidden" name="_method" value="delete"/>
                                <button class="u-btn u-btn-normal u-btn-xs del" onclick="javascript:return show_confirm()">删除</button>
                            </form>

                        </#if>
                    </li>
                </#list>
            </ul>
        </div>
    </div>

    <div class="n-foot">
        <p>版权所有：网易云课堂<a href="http://mooc.study.163.com/smartSpec/detail/85002.htm">Java开发工程师(Web方向)</a>微专业团队</p>
    </div>
    <script type="text/javascript" src="/js/global.js"></script>
    <script type="text/javascript" src="/js/pageIndex.js"></script>
    <script type="text/javascript">
        function show_confirm()
        {
            var msg = "您真的确定要删除吗？\n\n请确认！";
            if (confirm(msg)==true)
            {
                return true;
            }
            else
            {
                return  false;
            }
        }
    </script>
</body>
</html>